package com.imooc;

import com.imooc.bilibili.websocket.WebSocketService;
import org.elasticsearch.common.recycler.Recycler;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;


@SpringBootApplication
@MapperScan("com.imooc.bilibili.mapper")
@EnableAsync
@EnableScheduling
@EnableFeignClients(basePackages = "com.imooc.bilibili.feign")
@EnableHystrix
public class IMoocBiliBiliApplication {
    public static void main(String[] args) {
       ApplicationContext app = SpringApplication.run(IMoocBiliBiliApplication.class, args);
        WebSocketService.setApplicationContext(app);
    }
}